

package org.pizza.rocket.core.annotation;

import com.aliyun.openservices.ons.api.PropertyValueConst;
import org.springframework.stereotype.Component;

import java.lang.annotation.*;

/**
 * @author kynb_club
 * email kynb_club@163.com
 * 消费者消息监听器
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Component
public @interface RocketMessageListener {
    String NAME_SERVER_PLACEHOLDER = "${rocketmq.name-srv-addr:}";
    String ACCESS_KEY_PLACEHOLDER = "${rocketmq.access-key:}";
    String SECRET_KEY_PLACEHOLDER = "${rocketmq.secret-key:}";

    /**
     * groupName name.
     */
    String groupName();
    /**
     * Topic name.
     */
    String topic();
    /**
     * tag name.
     */
    String tag();
    /**
     * maxReconsumeTimes.
     */
    int maxReconsumeTimes() default 15;

    /**
     * messageModel 消息模式
     */
    String messageModel() default PropertyValueConst.CLUSTERING;
    /**
     * consumeThreadNums.
     */
    int consumeThreadNums() default 20;
    /**
     * The property of "access-key".
     */
    String accessKey() default ACCESS_KEY_PLACEHOLDER;
    /**
     * The property of "secret-key".
     */
    String secretKey() default SECRET_KEY_PLACEHOLDER;
    /**
     * The property of "nameServer".
     */
    String nameServer() default NAME_SERVER_PLACEHOLDER;
}
